#define _CRT_SECURE_NO_WARNINGS 1

#include"Huffman.h"

int main()
{
	int n = 15, i = 0;
	char* str[] = { "The","of","a","to","and","in","that","he",
					"is","at","on","for","His","are","be" };
	int fnum[] = { 1192,677,541,518,462,450,242,195,190,181,174,157,138,124,123 };
	HTNode ht[M];
	HTCode hcd[N];
	for (i = 0; i < n; i++)
	{
		strcpy(ht[i].data, str[i]);
		ht[i].weight = fnum[i];
	}
	CreateHT(ht, n);
	CreateHCode(ht, hcd, n);
	DispHCode(ht, hcd, n);
	return 0;
}